package com.bite.deom2;

import java.util.Comparator;

public class Student extends People implements Comparable<Student> {

    public Student(String name, int age) {
        super(name, age);
    }

    @Override
    public String toString() {
        return getName()+", "+getAge();
    }

    @Override
    public int compareTo(Student o) {
        return this.getAge() - o.getAge();
    }
}
